import {Injectable} from '@angular/core';
import {SysAttachmentSearchForm} from '../entity/sys-attachment-search-form';
import {SysAttachment} from '../entity/sys-attachment';
import {BaseService} from '@sb/base';
import {Observable} from 'rxjs/index';
import {catchError} from 'rxjs/operators';
import {baseHandleError} from '@sb/base/core/service/base-http-service';
import {ReturnForm} from '@sb/base/core/entity';
import {HttpClient} from '@angular/common/http';
import {environment} from '../../../../../environments/environment';

/**
 * 机构服务
 */
export interface BaseAttachmentService {

    /**
     * 根据多个附件id查询
     * @param ids 主键集
     */
    getAttachments(ids: string[], params?: { [key: string]: any }): Observable<ReturnForm<SysAttachment[]>>;

    uploadAttachment(file: FormData, params?: { [key: string]: any }): Observable<ReturnForm<SysAttachment>>;

    getReadAttachmentUrl(id, params?: { [key: string]: any }): string;

    getReadAttachmentThumbUrl(id, params?: { [key: string]: any }): string;
}
